using System;
using System.ComponentModel;
using System.Windows.Forms;

namespace ExperimentRuleEditor
{
    public class EOperator : Form
    {
        public string m_LOperator;

        private IContainer components;

        private ComboBox cbOperator;

        private Button btOk;

        private Button btCancel;

        public int GetOperatorIndex
        {
            get
            {
                return cbOperator.SelectedIndex;
            }
        }

        public EOperator(string mOperator, int m_Operator)
        {
            InitializeComponent();
            if (mOperator == null)
            {
                cbOperator.SelectedIndex = m_Operator;
            }
            else
            {
                cbOperator.Text = mOperator;
            }
        }

        private void btOk_Click(object sender, EventArgs e)
        {
            m_LOperator = cbOperator.SelectedItem.ToString();
            base.DialogResult = DialogResult.OK;
            Close();
        }

        private void btCancel_Click(object sender, EventArgs e)
        {
            base.DialogResult = DialogResult.Cancel;
            Close();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && components != null)
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExperimentRuleEditor.EOperator));
            this.cbOperator = new System.Windows.Forms.ComboBox();
            this.btOk = new System.Windows.Forms.Button();
            this.btCancel = new System.Windows.Forms.Button();
            base.SuspendLayout();
            this.cbOperator.AccessibleDescription = null;
            this.cbOperator.AccessibleName = null;
            resources.ApplyResources(this.cbOperator, "cbOperator");
            this.cbOperator.BackgroundImage = null;
            this.cbOperator.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbOperator.Font = null;
            this.cbOperator.FormattingEnabled = true;
            this.cbOperator.Items.AddRange(new object[4]
            {
                resources.GetString("cbOperator.Items"),
                resources.GetString("cbOperator.Items1"),
                resources.GetString("cbOperator.Items2"),
                resources.GetString("cbOperator.Items3")
            });
            this.cbOperator.Name = "cbOperator";
            this.btOk.AccessibleDescription = null;
            this.btOk.AccessibleName = null;
            resources.ApplyResources(this.btOk, "btOk");
            this.btOk.BackgroundImage = null;
            this.btOk.Font = null;
            this.btOk.Name = "btOk";
            this.btOk.UseVisualStyleBackColor = true;
            this.btOk.Click += new System.EventHandler(btOk_Click);
            this.btCancel.AccessibleDescription = null;
            this.btCancel.AccessibleName = null;
            resources.ApplyResources(this.btCancel, "btCancel");
            this.btCancel.BackgroundImage = null;
            this.btCancel.Font = null;
            this.btCancel.Name = "btCancel";
            this.btCancel.UseVisualStyleBackColor = true;
            this.btCancel.Click += new System.EventHandler(btCancel_Click);
            base.AccessibleDescription = null;
            base.AccessibleName = null;
            resources.ApplyResources(this, "$this");
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackgroundImage = null;
            base.Controls.Add(this.btCancel);
            base.Controls.Add(this.btOk);
            base.Controls.Add(this.cbOperator);
            this.Font = null;
            base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            base.Icon = null;
            base.MaximizeBox = false;
            base.MinimizeBox = false;
            base.Name = "EOperator";
            base.ShowIcon = false;
            base.ShowInTaskbar = false;
            base.ResumeLayout(false);
        }
    }
}
